<style>
 /*验证：提示信息样式 begin*/
 .am-alert-danger {
    background-color: transparent;
    border-color: transparent;
    color: red;
  }
  .am-alert {
    margin-bottom: 1em;
    padding: .625em;
    background: transparent;
    border: none;
    border-radius: 0;
  }
  /*验证：提示信息样式 end*/
  /*附件上传*/
  .am-progress-xs {
    height: .2rem;
  }
  .am-progress {
    margin-bottom: 0;
  }
</style>

<input type="hidden" id="product-id" name="productId" value="${product.id!''}"/>
<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>选择品牌
  </div>
  <div class="am-u-sm-6 am-u-md-6">
    <!--默认选中的option加selected或者selected="selected"-->
    <!-- <option value="a" selected>Apple</option> -->
    <select data-am-selected="{maxHeight: 100, btnWidth: '100%', btnSize: 'sm', btnStyle: 'secondary',searchBox: 1}" name="brand_id" placeholder="请选择" required>
      <%for(brand in brands){%>
        <option class="am-text-xs" value="${brand.id!''}" <%if(brand.id! == product.brand_id!){%>selected<%}%>>${brand.name!''}</option>
      <%}%>
    </select>
    <!-- <div><label class="lable-alert" for="test"></label></div> -->
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div>

<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>商品名称
  </div>
  <div class="am-u-sm-6 am-u-md-6">
    <input data-validation-message="输入商品名称" type="text"  name="name" id="name" minlength="2" maxlength="100" placeholder="输入商品名称" required value="${product.name!''}"/>
    <!-- <label class="lable-alert" for="user-name"></label> -->
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div>

<!-- <div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>标题:
  </div>
  <div class="am-u-sm-6 am-u-md-6">
    <input data-validation-message="输入商品标题" type="text" name="title" id="title" minlength="1" maxlength="512" placeholder="输入商品标题" required value="${product.title!''}"/>
    <label class="lable-alert" for="user-mobile"></label>
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div> -->
<!-- <div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>概述:
  </div>
  <div class="am-u-sm-6 am-u-md-6">
    <input data-validation-message="输入商品概述" type="text" name="desp_summary" id="desp_summary" minlength="1" maxlength="255" placeholder="输入商品概述" required
    value="${product.desp_summary!''}"/>
    <label class="lable-alert" for="user-name"></label>
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div> -->

<!-- <div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>售后:
  </div>
  <div class="am-u-sm-6 am-u-md-6">
    <input data-validation-message="输入商品售后" type="text" name="desp_aftersale" id="desp_aftersale" minlength="1" maxlength="255" placeholder="输入商品售后" required value="${product.desp_aftersale!''}"/>
    <label class="lable-alert" for="user-name"></label>
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div> -->

<!-- <div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>缩略图
  </div>
  <div class="am-u-sm-6 am-u-md-6">
    <input type="text" id="thumbnail" name="thumbnail" placeholder="请上传缩略图（ *.gif,*.jpg,*.jpeg,*.png ）" value="${product.thumbnail!''}" readonly required/>
  </div>
  <div class="am-u-sm-2 am-u-md-4">
     <div class="am-form-file am-text-xs">
       <button type="button" class="am-btn am-btn-primary am-btn-sm">
        <i class="am-icon-cloud-upload"></i> 选择要上传的图片
       </button>
       <input id="thumbnail_fileupload" type="file" name="files[]" multiple>
      </div>
       <div id="thumbnail-progress-area" class="am-margin-top-sm am-hide">
           <div id="thumbnail-progress-text" class="am-text-xs am-text-right"></div>
             <div id="thumbnail-progress" class="am-progress am-progress-xs">
             <div class="am-progress-bar thumbnail-am-progress-bar" style="width: 0%"></div>
           </div>
     </div>
  </div>
</div> -->
<!--缩略图预览图-->
<!-- <div class="am-g am-form-group am-margin-top am-hide">
  <div class="am-u-sm-4 am-u-md-2">&nbsp;</div>
  <div class="am-u-sm-6 am-u-md-6" id="thumbnail-preview">
    <div class="am-u-sm-4 am-u-md-4">
      <img width="100%" src="http://s.amazeui.org/media/i/demos/bing-1.jpg"  alt="远方 有一个地方 那里种有我们的梦想"/>
      <div class="am-text-center am-text-primary am-margin-top-xs">删除</div>
    </div>
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div> -->
<!-- <div class="am-g am-form-group am-margin-top" id="thumbnail_preview" name="thumbnail_preview">

</div> -->


<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>商品封面图片
  </div>
  <div class="am-u-sm-6 am-u-md-6">
    <input type="hidden" id="banner_img" name="banner_img" value="${product.banner_img!''}"  readonly  required/>
       <div class="am-form-file am-text-xs">
	       <button type="button" class="am-btn am-btn-primary am-btn-sm">
	        <i class="am-icon-cloud-upload"></i> 选择要上传的图片
	       </button>
	       <input id="banner_fileupload" type="file" onChange="fileChange('banner_fileupload')" name="files[]" multiple><span style="color:red;">* 仅支持上传图片文件类型(.jpg,.jpge,.bmp,.gif,.png)</span>
      </div>
       <div id="progress-area" class="am-margin-top-sm am-hide">
           <div id="progress-text" class="am-text-xs am-text-right"></div>
             <div id="progress" class="am-progress am-progress-xs">
             <div class="am-progress-bar" style="width: 0%"></div>
           </div>
     </div>
  </div>
  
  
  
  <div class="am-u-sm-2 am-u-md-4 input-msg" id="image_valid"></div>
</div>

<!--广告预览图-->
<div class="am-g am-form-group am-margin-top am-hide">
  <div class="am-u-sm-4 am-u-md-2">&nbsp;</div>
  <div class="am-u-sm-6 am-u-md-6" id="banner-img-preview">
    <!-- <div class="am-u-sm-4 am-u-md-4">
      <img width="100%" src="http://s.amazeui.org/media/i/demos/bing-1.jpg"  alt="远方 有一个地方 那里种有我们的梦想"/>
      <div class="am-text-center am-text-primary am-margin-top-xs">删除</div>
    </div> -->
    <div class="am-u-sm-4 am-u-md-4" id="banner-img-split"></div>
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div>

<!-- <div class="am-g am-form-group am-margin-top" id="banner_img_preview" name="banner_img_preview">
	<div class="am-u-sm-12 am-u-md-12">
	    <div class="am-u-sm-3 am-u-md-3" id="banner_img_split" name="banner_img_split"></div>
	</div>
</div> -->

<!-- <div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>是否上架
  </div>
  <div class="am-u-sm-6 am-u-md-6">
    <input data-am-switch id="status" name="status" type="checkbox" data-size="sm" data-off-text="否" data-on-text="是" value="${product.status!1}" style="display:none;" <%if(product.status!1 != 0){%>checked<%}%> required/>
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div> -->

<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>上架时间
  </div>
  <div class="am-u-sm-6 am-u-md-6">
      <div class="am-input-group date form_datetime"
          data-date="2016-05-31 12:35">
          <span class="am-input-group-label add-on"><i
              class="icon-th am-icon-calendar"></i></span> <input id="put_on_time" name="put_on_time" readonly 
              size="16" type="text" value="${product.put_on_time!, dateFormat="yyyy-MM-dd HH:mm:ss"}"
              class="am-form-field" required /> <span
              class="am-input-group-label add-on"><i
              class="icon-remove am-icon-close"></i></span>
      </div>
      <label class="lable-alert" for="addDate"></label>
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div>

<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    下架时间
  </div>
  <div class="am-u-sm-6 am-u-md-6">
      <div class="am-input-group date form_datetime"
          data-date="2016-05-31 12:35">
          <span class="am-input-group-label add-on"><i
              class="icon-th am-icon-calendar"></i></span> <input id="put_off_time" name="put_off_time" readonly
              size="16" type="text" value="${product.put_off_time!, dateFormat="yyyy-MM-dd HH:mm:ss"}"
              class="am-form-field" 
              data-validation-message="下架时间不能早于上架时间" placeholder="下架时间为空，则默认永久上架" /> <span
              class="am-input-group-label add-on"><i
              class="icon-remove am-icon-close"></i></span>
      </div>
      <label class="lable-alert" for="addDate"></label>
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div>

<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>分享术语
  </div>
  <div class="am-u-sm-6 am-u-md-6">
    <input data-validation-message="分享术语不超过40个字符"  type="text" name="desp_summary" id="desp_summary" minlength="1" maxlength="40" placeholder="请输入分享术语，不能超过40个字符" required
    value="${product.desp_summary!''}"/>
    <label class="lable-alert" for="user-name"></label>
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div>

<div class="am-g am-form-group am-margin-top">
    <div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>排序</div>
    <div class="am-u-sm-6 am-u-md-6">
        <input type="text" class="am-input js-pattern-sort" name="sort"  data-validation-message="排序不能为空且只能是纯数字" placeholder="请输入纯数字,越小越向前" maxlength="11" required
            value="${product.sort!99}" />
    </div>
    <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div>
<!--
<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>销售地域
  </div>
  <div class="am-u-sm-6 am-u-md-6">
    <label class="am-checkbox-inline">
      <input type="checkbox" id="regionsAll" name="regionsAll" value="" data-am-ucheck >全省
    </label>
  <br/>
    <%var i=0;%>
    <%for(region in regionList){
      i++;
      if(i==1){
    %>
      <label class="am-checkbox-inline">
        <input data-am-ucheck data-validation-message="请至少选择1城市" type="checkbox" id="regions" name="regions" value="${region.key}" required minchecked="1" onclick="regionsClick(this);" <%if(region.checked){%>checked<%}%>>${region.value}
      </label>
    <%}else{%>
      <label class="am-checkbox-inline">
      <input type="checkbox" id="regions" name="regions" value="${region.key}" data-am-ucheck onclick="regionsClick(this);" <%if(region.checked){%>checked<%}%>>${region.value}
    </label>
    <%}%>
    <%if(i%8==0){%>
    <br/>
    <%}}%>    
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>  
</div>
-->


